package com.example.userservie.demos.web;

import org.springframework.stereotype.Repository;

import java.util.HashMap;

/**
 * @Classname UserRepository
 * @Description
 * @Author caozhenhao001
 * @Date 2024/3/20
 * @Version
 */
@Repository
public class UserRepository {
    HashMap<String, User> userHashMap = new HashMap<>();
    public User getUserById(String id) {
        userHashMap.put("1", new User("1", "张三"));
        userHashMap.put("2", new User("2", "张四"));
        userHashMap.put("3", new User("3", "张五"));
        userHashMap.put("4", new User("4", "张六"));
        userHashMap.put("5", new User("5", "张起"));
        userHashMap.put("6", new User("6", "张八"));
        return userHashMap.get(id);
    }
}
